<?php
/**
 * Description
 *
 * PHP version 7
 *
 * @category Custom
 * @package  Custom
 * @author   ryu <mo5467@126.com>
 * @date     2020-04-28 23:32:16
 * @lastTime 2020-05-01 23:14:03
 * @license  https://opensource.org/licenses/MIT MIT License
 * @link     none
 */
namespace Test\Unit;

use Design\Behavioral\NullObject\Service;
use Design\Behavioral\NullObject\NullLogger;
use Design\Behavioral\NullObject\PrintLogger;

class NullObjectTest extends \Test\BaseTest
{


    public function testNullLogger()
    {
        $service = new Service(new NullLogger());
        $this->expectOutputString('');

        $service->log('ryu');

    }//end testNullLogger()


    public function testPrintLogger()
    {
        $service = new Service(new PrintLogger());
        $this->expectOutputString('ryu');

        $service->log('ryu');

    }//end testPrintLogger()


}//end class
